package com.erp.erp_project.core.base;

import lombok.Data;

/**
 * @author yh
 */
@Data
public class AjaxResult<T> {
    private Boolean success;
    private Integer code;
    private String msg;
    private T data;

    public AjaxResult(T data) {
        this.success = true;
        this.code = 200;
        this.msg = "请求成功";
        this.data = data;
    }

    public AjaxResult(Integer code, String msg) {
        this.success = false;
        this.code = code;
        this.msg = msg;
    }
    public AjaxResult(String msg) {
        this.success = true;
        this.code = 200;
        this.msg = msg;
    }
}
